<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" session="true"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<script type="text/javascript">
		function update(){
			$("#form").attr("action","/menu/menuUpdateOk.do");
			$("#form").submit();  
		}  
		
		function goList(){
			$("#form").attr("action","/menu/menuList.do");
			$("#form").submit();    
		}  
</script>  
	
	<h2 class="sub-header">${title}</h2> 	
		<form class="form-horizontal" role="form" name="form" id="form" method="post">
		<input name="menuNo" id="menuNo" type="hidden" value="${menuDetail.menuNo}">
		  <div class="form-group">   
		    <label for="inputEmail3" class="col-sm-2 control-label">매뉴 이름</label>
		    <div class="col-sm-10">
		      <input type="text" class="form-control" name="menuNm" id="menuNm" placeholder="메뉴 이름" value="${menuDetail.menuNm }">
		    </div>  
		  </div>
		  <div class="form-group">
		    <label for="inputPassword3" class="col-sm-2 control-label">상위메뉴 번호</label>
		    <div class="col-sm-10">
	          	<select class="form-control" name="menuGrpNo" id="menuGrpNo">
					<option value="">상위메뉴</option>
					<c:forEach items="${selectorList}" var="selectorList" varStatus="status">
						<option value="${ selectorList.selectorNo }" <c:if test="${ menuDetail.menuGrpNo eq selectorList.selectorNo }">selected="selected"</c:if>>${ selectorList.selectorNm }</option>
					</c:forEach>
				</select>  
		    </div>
		  </div>
		  <div class="form-group">
		    <label for="inputPassword3" class="col-sm-2 control-label">소스 경로</label>
		    <div class="col-sm-10">
		      <input type="text" class="form-control" name="sourcePath"  id="sourcePath" placeholder="소스 경로" value="${menuDetail.sourcePath }">
		    </div>
		  </div>
		  <div class="form-group">
		    <label for="inputPassword3" class="col-sm-2 control-label">순서</label>
		    <div class="col-sm-10">
		      <input type="text" class="form-control" name="orderCnt"  id="orderCnt" placeholder="메뉴 설명" value="${menuDetail.orderCnt }">
		    </div>
		  </div>
		  <div class="form-group">
		    <label for="inputPassword3" class="col-sm-2 control-label">메뉴 설명</label>
		    <div class="col-sm-10">
		      <input type="text" class="form-control" name="menuInfo"  id="menuInfo" placeholder="메뉴 설명" value="${menuDetail.menuInfo }">
		    </div>
		  </div>
		  <div class="form-group">
		    <div class="col-sm-offset-2 col-sm-10">  
		     	<a class="btn btn-default" href="#" onClick="update()">등록</a>
		     	<a class="btn btn-default" href="#" onClick="goList()">목록</a>
		    </div>
		  </div>
		</form>